home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 6 / FM Towns Free Software Collection 6.iso / ms_dos / gds / source / gds219.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-08  |  587 b   |  28 lines

  1.  
  2. /*
  3.  *
  4.  *    GDS219 : 文字の方向
  5.  *
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <dos.h>
  10.  
  11. unsigned char *GDS_append(unsigned char *wp,unsigned int size);
  12.  
  13. void GDS_string_direction(unsigned char *wp,unsigned int dir) {
  14.    static signed int ele[4][4] = {
  15.       {  0, 1, 1, 0 },
  16.       {  0, 1,-1, 0 },
  17.       { -1, 0, 0, 1 },
  18.       {  1, 0, 0,-1 }
  19.    };
  20.  
  21.    wp=GDS_append(wp,10);
  22.    *(unsigned int *)(wp+0)=0x5000+16*32+8;
  23.    *(signed int *)(wp+2)=ele[dir][0];
  24.    *(signed int *)(wp+4)=ele[dir][1];
  25.    *(signed int *)(wp+6)=ele[dir][2];
  26.    *(signed int *)(wp+8)=ele[dir][3];
  27. }
  28.